import request from '@/utils/request'
// 日记-列表
export function getList(data) {
  return request({
    url: 'biz/diary/list',
    method: 'get',
    params: data
  })
}
// 日记-详情
export function getDetail(id) {
  return request({
    url: 'biz/diary/'+id,
    method: 'get'
  })
}
// 日记-增
export function getAdd(data) {
  return request({
    url: 'biz/diary',
    method: 'post',
    data
  })
}
// 日记-删
export function del(ids) {
  return request({
    url: 'biz/diary',
    method: 'delete',
    data: ids
  })
}
// 日记-改
export function getUpdate(data) {
  return request({
    url: 'biz/diary',
    method: 'put',
    data
  })
}
// 日记-审核
export function detailCheck(data) {
  return request({
    url: 'biz/diary/check',
    method: 'post',
    data
  })
}
// 日记-审核记录
export function detailRecords(id) {
  return request({
    url: 'biz/diary/records?id='+id,
    method: 'get',
  })
}
// 日记-上下架
export function detailUpDown(data) {
  return request({
    url: 'biz/diary/updateStatus',
    method: 'post',
    data
  })
}
// 日记-设置等级
export function detailUpdateInfo(data) {
  return request({
    url: 'biz/diary/updateInfo',
    method: 'put',
    data
  })
}
export default { getList, getAdd, del, getUpdate, getDetail, detailCheck, detailRecords, detailUpDown, detailUpdateInfo}